#include<iostream>
#include<signal.h>

void sigcb(int signo)
{
    std::cout << signo << std::endl;
    exit(0);
}

int main()
{
    struct sigaction act, oct;
    act.sa_handler = sigcb;

    sigaction(SIGINT, &act, &oct);

    return 0;
}